﻿using System;

class CompareArrays

            // Write a program that reads two arrays from the console and compares them element by element.

{
    static void Main()
    {
        int numbers = 0;
        Console.Write("Enter the length of the arrays: ");
        int arraySize = int.Parse(Console.ReadLine());
        int[] firstArray = new int[arraySize];
        int[] secondArray = new int[arraySize];

        Console.WriteLine("Enter the elements of first array: ");
        for (int i = 0; i < arraySize; i++)
        {
            firstArray[i] = int.Parse(Console.ReadLine());
        }

        Console.WriteLine("Enter the elements of second array: ");
        for (int i = 0; i < arraySize; i++)
        {
            secondArray[i] = int.Parse(Console.ReadLine());
        }
            
        for (int i = 0; i < arraySize; i++)
        {
            if (firstArray[i] == secondArray[i])
            {
                numbers += 1;
            }
            else break;
        }
        if (numbers == arraySize)
        {
            Console.WriteLine("The two arrays are equal");
        }
        else
        {
            Console.WriteLine("The two arrays are different");
        }
    }
}

